package com.yuyu.shop.infrastructure.persistence.convert;

import cn.hutool.core.bean.BeanUtil;
import com.yuyu.shop.domain.goods.DO.GoodsDO;
import com.yuyu.shop.infrastructure.persistence.po.GoodsPO;

import java.util.Objects;

/**
 * @author
 * @version 1.0
 * @description: TODO
 * @date 2022/8/4 17:39
 */
public class GoodsPoConvert {

    public static GoodsDO PO2DO(GoodsPO po){
        if (Objects.nonNull(po)){
            GoodsDO goodsDO = new GoodsDO();
            BeanUtil.copyProperties(po,goodsDO);
            return goodsDO;
        }
        return null;
    }
}
